package sz.szsmk.citizencard.util;

/**
 * Copyright (c)2019
 * author: zdh
 * created on: 2019/1/27 11:13
 * description: 防止按钮被连续点击
 */
public class ButtonUtils {
  private static final int MIN_CLICK_DELAY_TIME = 400;
  private static long lastClickTime;

  public static boolean isFastClick() {
    boolean flag = false;
    long curClickTime = System.currentTimeMillis();
    if ((curClickTime - lastClickTime) >= MIN_CLICK_DELAY_TIME) {
      flag = true;
    }
    lastClickTime = curClickTime;
    return flag;
  }

}